<template>
  <page-wrap back hide-tab title="选择职业" stay-still :bg-color="uNavColor">
    <InterViewNavbg />
    <view class="title title-line" style="">热门职业</view>
    <view class="cell" v-for="(item, index) in list" :key="index" @click="clickCell(item)">
      <view class="title">{{ item.career.ylPositionName }}</view>
      <image class="img" :src="item.src"></image>
    </view>
    
  </page-wrap>
</template>

<script>
import InterViewNavbg from "./components/InterViewNavbg.vue";
export default {
  components: {
    InterViewNavbg,
  },
  data() {
    return {
      list: [
        {
          src: this.$imgBaseSelf + "interview/aiSearchPic1.png",
          career: {
            ylPositionId: 111948,
            ylPositionName: "HRBP",
          },
        },
        {
          src: this.$imgBaseSelf + "interview/aiSearchPic2.png",
          career: {
            ylPositionId: 114147,
            ylPositionName: "铸造工程师",
          },
        },
        {
          src: this.$imgBaseSelf + "interview/aiSearchPic3.png",
          career: {
            ylPositionId: 119109,
            ylPositionName: "油脂工艺工程师",
          },
        },
      ],
    };
  },
  mounted() {},
  methods: {
    clickCell(item) {
      const pages = getCurrentPages()
      const prevPage = pages[pages.length - 2]
      prevPage.setData({
        resultData: item.career,
      })
      uni.navigateBack();
    },
  },
};
</script>

<style lang="scss" scoped>
.title {
  font-size: 36rpx;
  font-family: PingFang-SC-Bold, PingFang-SC;
  font-weight: bold;
  color: #222222;
  line-height: 44rpx;
  margin-left: 32rpx;

  &-line { 
    margin-top: 20rpx;
    margin-bottom: 32rpx;
  }
}

.cell {
  background: #ffffff;
  display: flex;
  margin: 14rpx 32rpx;
  border-radius: 16rpx;
  justify-content: space-between;
  align-items: center;
}

.img {
  width: 128rpx;
  height: 112rpx;
  margin-right: 30rpx;
}
</style>
